//
//  studentModel.m
//  201-数据存储
//
//  Created by student on 16/3/14.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "studentModel.h"
#define kKey @"student"

@implementation studentModel
- (void)encodeWithCoder:(NSCoder *)aCoder{
    NSDictionary *dic = @{@"stuName":self.stuName,@"stuAge":self.stuAge,@"stuID":self.stuID};
    [aCoder encodeObject:dic forKey:kKey];
}
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder{
    self = [super init];
    if (self) {
        NSDictionary *dic = [aDecoder decodeObjectForKey:kKey];
        self.stuAge = dic[@"stuAge"];
        self.stuName = dic[@"stuName"];
        self.stuID = dic[@"stuID"];
    }
    return self;
}

@end
